#include<bits/stdc++.h>
using namespace std;
#define int long long
int n,a[1000005];
signed main(){
  freopen("duel.in","r",stdin);
  freopen("duel.out","w",stdout);
  scanf("%lld",&n);
  for(int i=1;i<=n;i++){
    scanf("%lld",&a[i]);
  }
  sort(a+1,a+1+n);
  int zr=1;
  for(int k=1;k<=n;k++){
    if(a[k]>a[zr]){
        zr++;
    }
  }
  printf("%lld\n",n-zr+1);
  return 0;
}
